package frist50;

public class T0012 {
    public String intToRoman(int num) {
        String str = "";
        int[] ints={1000,900,500,400,100,90,50,40,10,9,5,4,1};
        String[] strings={"M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"};
        for (int i = 0; i <13 ; i++) {
            int quotient=num/ints[i];
            num=num%ints[i];
            for (int j = 0; j < quotient; j++) {
                str+=strings[i];
            }
        }
        return str;
    }
}
